// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

{%- macro namespace_begin() %}
{%-   for namespace in namespaces_as_array %}
namespace {{namespace}} {
{%-   endfor %}
{%- endmacro %}

{%- macro namespace_end() %}
{%-   for namespace in namespaces_as_array|reverse %}
}  // namespace {{namespace}}
{%-   endfor %}
{%- endmacro %}

#include "{{module.path}}-connectivity.h"

#include "base/check.h"
#include "base/functional/callback_helpers.h"
#include "base/logging.h"
#include "chromeos/ash/services/cros_healthd/testing/bindings/local_state.h"
#include "chromeos/ash/services/cros_healthd/testing/bindings/remote_state.h"
#include "chromeos/ash/services/cros_healthd/testing/bindings/utils.h"

{%- for imp in module.imports %}
#include "{{imp.path}}-connectivity.h"
{%  endfor %}

{{namespace_begin()}}

{%- for interface in module.interfaces %}
{%    include "test-provider.cc.j2" %}
{%    include "test-consumer.cc.j2" %}
{%    for enum in interface.enums %}
{%      include "enum-generator.cc.j2" %}
{%    endfor %}
{%- endfor %}

{%- for struct in module.structs %}
{%    include "struct-generator.cc.j2" %}
{%    for enum in struct.enums %}
{%      include "enum-generator.cc.j2" %}
{%    endfor %}
{%  endfor %}

{%  for union in module.unions %}
{%    include "union-generator.cc.j2" %}
{%  endfor %}

{%  for enum in module.enums %}
{%    include "enum-generator.cc.j2" %}
{%  endfor %}

{{namespace_end()}}
